package com.vancouver.knows.business.tracker;

import com.pangu.task.IResultReceiver;
import com.pangu.task.OperateResult;
import com.vancouver.knows.business.BusinessModule;
import com.vancouver.knows.business.bean.UploadedUserPostDetailInfo;

/**
 * Created by Chris Li on 2016-07-20.
 */
public class UploadUserPostTracker extends ABInvokeTracker {

    public UploadUserPostTracker(BusinessModule module, IResultReceiver resultReceiver) {
        super(module, resultReceiver);
    }

    @Override
    public String TAG() {
        return UploadUserPostTracker.class.getSimpleName();
    }

    @Override
    public void handleResult(OperateResult result) {
        UploadedUserPostDetailInfo uploadedUserPostDetailInfo = (UploadedUserPostDetailInfo) result.getResultData();
        if (uploadedUserPostDetailInfo != null) {
            module.getCacheManager().setUploadedUserPostDetailInfo(uploadedUserPostDetailInfo);
        }
    }
}
